package com.huawei;
import java.util.Scanner;
/**
 * Created by Z-hong on 2024/7/24.
 */

public class HJ82 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str=sc.next();
            String[] split = str.split("/");
            int arr[]={Integer.parseInt(split[0]), Integer.parseInt(split[1])};
            System.out.println(getString(arr,2,""));
        }
    }
    public static String getString(int[] arr,int i,String str){
        boolean flag=true;
        while(flag){
            if(arr[1]%arr[0]==0){
                arr[1]=arr[1]/arr[0];
                arr[0]=1;
            }
            if(arr[0]==1&&arr[1]==i){
                if(str.isEmpty()){
                    str="1/"+i;
                }else{
                    str=str+"+1/"+i;
                }
                flag = false;
                break;
            }
            int num_1=arr[0]*i;
            int num_2=arr[1];
            if(num_1>num_2){
                arr[0]=num_1-num_2;
                arr[1]=arr[1]*i;
                if(str.isEmpty()){
                    str="1/"+i;
                }else{
                    str=str+"+1/"+i;
                }
            }
            if(arr[1]%arr[0]==0){
                i=arr[1]/arr[0];
            }else{
                i=arr[1]/arr[0]+1;
            }


        }
        return str;
    }


}
